import { createRouter,createWebHashHistory } from 'vue-router'
import { CONFIG } from '../config/index.js'
import clusterRoutes from './cluster.js'
import nodeRoutes from './node.js'
import namespaceRoutes from './namespace.js'
// import podRoutes from './pod.js'
// import deploymentRoutes from './deployment.js'
// import statefulsetRoutes from './statefulset.js'
// import cronjobRoutes from './cronjob.js'
// import daemonsetRoutes from './daemonset.js'
import {podRoutes, deploymentRoutes, statefulsetRoutes, daemonsetRoutes, cronjobRoutes} from './scheduling.js'


const Login = () => import('../view/Login.vue')
// const Index = () => import('../view/Index.vue')
const Layout = ()=>import ('../view/layout/Layout.vue')

const routes = [

    clusterRoutes,
    nodeRoutes,
    namespaceRoutes,
    podRoutes,
    deploymentRoutes,
    statefulsetRoutes,
    cronjobRoutes,
    daemonsetRoutes,
    
    {
        path: "/login",
        component: Login,
    },
    {
        path: "/",
        component: Layout
    },
]

const router = createRouter({
    history:createWebHashHistory(),
    routes,
})

export default router